@echo off

rem source /c/ZephyrProject/zephyr/zephyr-env.sh

rem # Configure the environment variables needed to inform the Zephyr build system to use this toolchain:
rem # Linux or macOS
rem export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
rem export GNUARMEMB_TOOLCHAIN_PATH="~/gnu_arm_embedded"

rem #Windows in cmd.exe
set ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
set GNUARMEMB_TOOLCHAIN_PATH=C:\Program Files (x86)\GNU Tools ARM Embedded\7 2018-q2-update

rem output dir
if not exist .\qemu_cortex_m3_output (
    mkdir qemu_cortex_m3_output
)
cd qemu_cortex_m3_output

rem Use cmake to configure a Ninja-based build system:
cmake -GNinja -DBOARD=qemu_cortex_m3 ..

rem Now run ninja on the generated build system:
ninja run

